<template>
  <div id="subpage">

    <el-col :span="24" class="warp-breadcrum">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item><b>小程序</b></el-breadcrumb-item>
        <el-breadcrumb-item>推送管理 当前最少可推送人数 {{ user_num }} </el-breadcrumb-item>
      </el-breadcrumb>
    </el-col>

    <div class="content">
      <div class="xcx-head">
        <div>
          <span class="font14">推送类型：</span>
          <el-select clearable class="w200" v-model="type" placeholder="请选择推送类型">
            <el-option v-for="(item, i) in typeArr" :key="i" :label="item.name" :value="item.id"></el-option>
          </el-select>

          <span class="font14">用户身份：</span>
          <el-select clearable class="w200" v-model="user_type" placeholder="请选择年份">
            <el-option v-for="(item, i) in user_typeArr" :key="i" :label="item.name" :value="item.id"></el-option>
          </el-select>

          <span class="mar_L_20 font14">关键词：</span>
          <el-input class="w251 font14" placeholder="请输入标题或期数" v-model="keys" clearable> </el-input>
          <el-button class="mar_L_20" type="primary" @click="search()" plain>筛选</el-button>
        </div>
        <span class="xcx-add left font14" @click="add()">添加推送</span>
      </div>
      <div class="xcx-content">
        <!--列表-->
        <el-table border :data="tableData" stripe style="width: 100%">
          <el-table-column prop="type" label="类型"></el-table-column>
          <el-table-column prop="obj.image" label="图片">
            <div slot-scope="scope">
              <img class="img_rectangle" :src="scope.row.obj.image" alt="">
            </div>
          </el-table-column>
          <el-table-column prop="title" label="标题"></el-table-column>
          <el-table-column prop="foot_txt" label="底部文案"></el-table-column>
          <el-table-column prop="user_num" label="推送人数"></el-table-column>
          <el-table-column label="操作">
            <div slot-scope="scope" class="doSonimg_box font14">
              <span class="text danger" @click="del_item(scope.row.id)">删除</span>
            </div>
          </el-table-column>
        </el-table>
        <!--分页-->
        <div class="paging">
          <el-pagination class="left" @current-change="handleCurrentChange" :current-page="page" background layout="prev, pager, next" :total="count"></el-pagination>
          <span class="demonstration left">共 {{ count }} 条 每页10条</span>
        </div>
      </div>
    </div>
  </div>
</template>
<script src="../../../static/js/mini_app/push_message.js"></script>
<style scoped>

</style>
